

/**
 * 添加分销商
 */
function add_seles() {
    var sales_name = $('#sales_name').val();
    var sales_phone = $('#sales_phone').val();

    if (null == sales_name || "" == sales_name) {
        showNotification("bottom", "right",'请输入分销商名称');
        return;
    }
    if (null == sales_phone || "" == sales_phone) {
        showNotification('bottom','right','请输入联系电话');
        return;
    }


    var data = {
        'salesName': sales_name,
        'salesPhone': sales_phone,
    }
    $.ajax({
        url: baseUrl.base + 'sales/addSales',
        type: 'get',
        data: data,
        success: function (data) {
            var code = data.code;
            if (code == '0') {
                //创建成功
                $('#Add_Tab_Modal').modal('hide');
                findAllTab();
            } else {
                //创建失败
                alert('添加失败，请重试');
            }
        }
    });
}